<?php
session_start();
require_once('check.php');
$user_id = $_SESSION['user']['uid'];
$vid = $_REQUEST['vid'];
$content = $_REQUEST['content'];
//var_dump($content);
//exit;
$sql="insert into comments values
(null,'$content',now(),$user_id,$vid)";
require_once("../system/conndb.php");
$link = connect();
$result = mysqli_query($link,$sql);
//$num = mysqli_affected_rows($result);
if($result)
	echo json_encode('1');
else
	echo json_encode('0');
?>